package com.day01.call;

import com.day01.inherit.MapSourceArgCommand;
import com.day01.inherit.MysqlDataSourceArgCommand;
import org.apache.catalina.User;

import java.util.Arrays;

public class UserCall {

    public void callDataSourceKeys() {
        MysqlDataSourceArgCommand mysqlSource = new MysqlDataSourceArgCommand("mysql", "key=value");
        Arrays.asList(mysqlSource.keys()).stream().forEach(key -> System.out.println(key));
    }

    public void callMapSourceKeys() {
        MapSourceArgCommand mapSourceArgCommand = new MapSourceArgCommand("map", "key=value");
        Arrays.asList(mapSourceArgCommand.keys()).stream().forEach(key -> System.out.println(key));
    }

    public static void main(String[] args) {
        UserCall call = new UserCall();
        call.callMapSourceKeys();
        call.callDataSourceKeys();
    }



}
